﻿using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Text;

namespace RPNCalculator
{
    [ContractClassFor(typeof(ICommand))]
    abstract class CommandBase : ICommand
    {
        [ContractInvariantMethod]
        private void ObjectInvariant()
        {
            Contract.Invariant(IsValueStackNull());
            Contract.Invariant(IsUndoStackNull());
        }
        public void Execute()
        {
            
        }

        public void Undo()
        {
            Contract.Ensures(UndoStackCount() == 0);
        }

        [Pure]
        public int ValueStackCount()
        {
            return default(int);
        }

        [Pure]
        public int UndoStackCount()
        {
            return default(int);
        }

        /*[Pure]
         bool IsEmpty()
        {
            return default(bool);
        }*/



      [Pure]
        public bool IsUndoStackNull()
        {
            return default(bool);
        }

        [Pure]
        public bool IsValueStackNull()
        {
            return default(bool);
        }

        [Pure]
        public bool IsEmpty()
        {
            return default(bool);
        }
    }
}
